﻿           <script type="text/javascript">
               $(document).ready(function () {
                   $("#btnSubmit").click(function () {
                       var http = new XMLHttpRequest();
                       var url = "/Want/CreditBuy";
                       var params = "selval=" + $('input:radio[name=raioCredit]:checked').val();
                       http.open("POST", url, true);
                       http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                       http.onreadystatechange = function () {//Call a function when the state changes.
                           if (http.readyState == 4 && http.status == 200) {
                               $("#auth_modal_container").dialog('close');
                               $("#auth_modal_container").css("display", "none");
                               bal = 1;
                           }
                       }
                       alert("sending : " + params);
                       http.send(params);

                   });
               });
           </script>
<div id="no-credit-box">

<div id="payment_update" class="box-shadow padding10">
        
<div id="dlgLogin">
    Your balance is not sufficient to pitch.Please buy credit.
</div>
@using (Html.BeginForm("CreditBuy", "Want", FormMethod.Post))
{
    @Html.RadioButton("raioCredit", 20, true)<span>20 Credit</span> 
    @Html.RadioButton("raioCredit", 50)<span>50 Credit</span> 
    @Html.RadioButton("raioCredit", 100)<span>100 Credit</span> 
    @Html.RadioButton("raioCredit", 200)<span>200 Credit</span> 
    <p></p>
    <input type="button" value ="Buy credit" id="btnSubmit" />
}
</div>
</div>
